package com.gopay.common.user.dao.impl;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.gopay.common.base.dao.impl.BaseDAOImpl;
import com.gopay.common.domain.cloud.CloudCustInfoLog;
import com.gopay.common.user.dao.CloudCustInfoLogDao;

/**
 * 
 * ZhangZG
 * 2015年12月29日 
 * www.gopay.com.cn Inc.All rights reserved.
 */
@Repository("cloudCustInfoLogDao")
public class CloudCustInfoLogDaoImpl extends BaseDAOImpl<CloudCustInfoLog, Serializable> implements CloudCustInfoLogDao {

	@Override
	public CloudCustInfoLog getByAgreeId(String agreeId) {
		String hql="from CloudCustInfoLog t where t.agreeId=:agreeId";
		Map<String, Object> map=new HashMap<String,Object>();
		map.put("agreeId", agreeId);
		List<CloudCustInfoLog> result = findByHql(hql, map);
		return result!=null&&result.size()>0?result.get(0):null;
	}
	@Override
	public CloudCustInfoLog getByTransDtlSq(Integer transDtlSq) {
		String hql="from CloudCustInfoLog t where t.transDtlSq=:transDtlSq";
		Map<String, Object> map=new HashMap<String,Object>();
		map.put("transDtlSq", transDtlSq);
		List<CloudCustInfoLog> result = findByHql(hql, map);
		return result!=null&&result.size()>0?result.get(0):null;
	}	
}
